package com.gzist.elderlyserviceplatform.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gzist.elderlyserviceplatform.common.base.BaseDO;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 资讯信息表
 */
@Data
@TableName("info_news")
@Schema(description = "资讯信息表")
public class InfoNews extends BaseDO {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "简介")
    private String summary;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "封面图片")
    private String cover;

    @Schema(description = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishTime;

    @Schema(description = "浏览次数")
    private Integer viewCount;

    @Schema(description = "分类 ID，关联 info_category 表的 id")
    private String categoryId;

}
